python: strip comma end of string
Posted
by krisdigitx
on Stack Overflow
See other posts from Stack Overflow
or by krisdigitx
Published on 2010-05-05T15:25:41Z
Indexed on
2010/05/05
15:28 UTC
Read the original article
Hit count: 325
python
how do i strip comma from the end of an string, i tried
awk = subprocess.Popen([r"awk", "{print $10}"], stdin=subprocess.PIPE)
awk_stdin = awk.communicate(uptime_stdout)[0]
print awk_stdin
temp = awk_stdin
t = temp.strip(",")
also tried t = temp.rstrip(","), both don't work.
© Stack Overflow or respective owner