Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help
#1
praire_pirates = [['Tractor Jack', 1000, True], ['Plowshare Pete', 950, False], ['Praire Lily', 245, True], ['Red River Rosie', 350, True], ['Mad Athabasca McArthur', 842, False],['Assiniboine Sally', 620, True], ['Thresher Tom', 150, True], ['Cranky Canola Carl', 499, False]]

I am supposed to create a list comprehension to create a list of the market values of each pirates grain, which are the numbers in the list. How do I go on about doing that?

all I have so far is plunder_value = [ ] and I dont know how to start it. Any help would be appreciated
Reply
#2
It would start with how you get the grain out of one pirate, and end with looping through the pirates.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Forum Jump:

User Panel Messages

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