Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to give variables to a list?
#2
str = "000\n111\n222\n333\n444\n555\n"
lis = str.splitlines()


print(lis[3])
print(lis[5])
Output:
333 555
Reply


Messages In This Thread
How to give variables to a list? - by HiImNew - Nov-17-2017, 05:31 AM
RE: How to give variables to a list? - by heiner55 - Nov-17-2017, 05:58 AM
RE: How to give variables to a list? - by HiImNew - Nov-17-2017, 07:03 AM
RE: How to give variables to a list? - by heiner55 - Nov-17-2017, 07:32 AM

Forum Jump:

User Panel Messages

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