Python Forum
Displaying list correspond to the column number
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Displaying list correspond to the column number
#2
def all_list(listas,column[]):
    #for no columns value
    if column == []:
        print(listas)
    elif column == [0, 1]:
         print([listas[0], listas[1]])
    elif column == [0, 2]:
         print([listas[0], listas[2]])
    elif column == [0, 3]:
         print([listas[0], listas[3]])
    elif column == [1, 0]:
         print([listas[1], listas[0]])
[/quote]

But this is not how it should look but it works
Reply


Messages In This Thread
RE: Displaying list correspond to the column number - by danlopek14q - Apr-04-2021, 10:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  list digit into number Voldyy 2 1,596 Jul-10-2022, 06:13 PM
Last Post: deanhystad
  How to convert every even number in a list to odd? Bruizeh 4 3,845 Aug-27-2021, 03:04 AM
Last Post: naughtyCat
  Get the biggest number from a two dimensional list rs74 13 4,142 Aug-09-2020, 04:02 PM
Last Post: deanhystad
  How can I print the number of unique elements in a list? AnOddGirl 5 3,327 Mar-24-2020, 05:47 AM
Last Post: AnOddGirl
  Multiplying number in a list in an order pythoneer 12 6,721 Mar-23-2018, 08:21 PM
Last Post: buran
  Displaying number of currency danellapotter 3 2,815 Jan-16-2018, 07:58 PM
Last Post: buran
  adding a number to the list atux_null 4 3,943 Nov-06-2017, 07:01 PM
Last Post: gruntfutuk
  Displaying a long list with Rows and Columns ngr33n 5 11,106 Sep-21-2017, 10:17 PM
Last Post: ngr33n
  sorted list not displaying Crackity 6 5,151 Jul-18-2017, 12:50 PM
Last Post: sparkz_alot
  Determine if a list contains a specific number of an item flannel_man 3 4,966 Nov-12-2016, 04:46 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

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