Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't figure this one out
#5
Thanks everybody!
Your answers helped allot.

I'm just still a bit confused. In earlier lines of code I used the same type of code as described above and it would execute without any error:

message = "\nMy favorite machine is the "

print(message + farm_equipment[0].upper())
The result:

Output:
My favorite machine is the JD R4038
Is this because I'm specifying an element from the list, which is a string and is thus allowed?
Reply


Messages In This Thread
Can't figure this one out - by Stefython - May-14-2017, 07:39 PM
RE: Can't figure this one out - by volcano63 - May-14-2017, 07:56 PM
RE: Can't figure this one out - by metulburr - May-14-2017, 07:58 PM
RE: Can't figure this one out - by wavic - May-14-2017, 08:01 PM
RE: Can't figure this one out - by Stefython - May-14-2017, 08:59 PM
RE: Can't figure this one out - by metulburr - May-14-2017, 09:10 PM
RE: Can't figure this one out - by wavic - May-15-2017, 03:04 AM

Forum Jump:

User Panel Messages

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