i'm writing a program that reads the lines of a file. each line has a name and and number separated by one space. i want to split the string but i only want the number because i'm using it in calculations. i've skimmed through the python docs and i'm still not sure how to do this. any help is apprecited, thank you!
kjock002
0
Newbie Poster
Recommended Answers
Jump to PostPerhaps you should start with the output of
>>> help(str)
Jump to PostThis is the best way http://lmgtfy.com/?q=python+string+split
All 7 Replies
Gribouillis
1,391
Programming Explorer
Team Colleague
zentraders
0
Newbie Poster
kjock002
0
Newbie Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
Tech B
48
Posting Whiz in Training
woooee
814
Nearly a Posting Maven
TrustyTony
888
pyMod
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.