Python Forum
need help with tutorial question
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need help with tutorial question
#4
list = ['1', '2', '3']
new_list = [int(text) for text in list]
Note that the above is only going to get you part way there. It's going to fail on the fourth line of sample input.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
need help with tutorial question - by vincelim99 - Mar-23-2017, 08:01 AM
RE: need help with tutorial question - by buran - Mar-23-2017, 09:06 AM
RE: need help with tutorial question - by nilamo - Mar-23-2017, 08:18 PM
RE: need help with tutorial question - by ichabod801 - Mar-23-2017, 10:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Tutorial range function question HawkeyeKnight 2 2,844 Sep-27-2018, 09:45 AM
Last Post: ThiefOfTime

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020