Python Forum
need help with tutorial question
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need help with tutorial question
#5
sorry i just forgot to paste my code but i specified my question at the bottom of my post
n = 0
List = [0]*5
while n < 5 :
List[n] = input("Enter some numbers here").split()
n = n + 1

These code gave me a table of strings and i was asking for a way to convert them to integer, but it's ok i figured it out by doing a nested loop
for i in range(len(List)):
for j in range(len(List[i])):
List[i][j] = int(List[i][j])

so it's all cool sorry for this :)
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 vincelim99 - Mar-24-2017, 01:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Tutorial range function question HawkeyeKnight 2 2,786 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