Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
insert
#1
hello, I'm a beginner at python and I run this code:

x = [1,2,3,4]
print("x= ",x)
y = x.insert(1,6)
print("y= ", y)
and the answer is:

Output:
x= [1, 2, 3, 4] y= None
why?
Reply


Messages In This Thread
insert - by mj125 - Aug-04-2018, 06:32 PM
RE: insert - by buran - Aug-04-2018, 07:08 PM
RE: insert - by mj125 - Aug-04-2018, 07:18 PM

Forum Jump:

User Panel Messages

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