Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
looking for list help
#1
Here is the program which I was trying to write but I was not getting output as expected.

Program: ask user to take two inputs first input as list with three elements and other input as one integer and then append it and print as a list. we can use list.append() method but still not getting as expected.

ex: user provides below inputs
[1, 2, 3]
4

expected output: [1, 2, 3, 4]

but I was getting output ['[1, 2, 3]' , 4 ]
Reply


Messages In This Thread
looking for list help - by tsathvik - Mar-14-2022, 12:03 AM
RE: looking for list help - by Yoriz - Mar-14-2022, 12:27 AM

Forum Jump:

User Panel Messages

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