Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
List capital letters
#2
The return is indented inside of the if statement so it will return straight away.
The return needs to be indented level with the for statement, it then will loop through all the letters before it returns the list.
It would also be a good idea to move the definition lista = [] into the start of the function.
Reply


Messages In This Thread
List capital letters - by ricardodepaula - Jul-21-2019, 05:09 PM
RE: List capital letters - by Yoriz - Jul-21-2019, 05:27 PM
RE: List capital letters - by DeaD_EyE - Jul-21-2019, 05:42 PM
RE: List capital letters - by ndc85430 - Jul-21-2019, 05:43 PM
RE: List capital letters - by DeaD_EyE - Jul-21-2019, 06:53 PM
RE: List capital letters - by ricardodepaula - Jul-21-2019, 11:35 PM
RE: List capital letters - by ndc85430 - Jul-22-2019, 05:37 AM
RE: List capital letters - by DeaD_EyE - Jul-22-2019, 06:45 AM
RE: List capital letters - by ricardodepaula - Jul-23-2019, 03:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  item from a line to list however when i print the line instead of words i get letters Sutsro 5 3,048 Apr-22-2020, 02:39 PM
Last Post: deanhystad
  Pynput - no capital letters jmair 2 4,623 Feb-12-2019, 09:53 PM
Last Post: jmair
  make a list of string in capital by using a function anancba 3 3,497 Nov-23-2017, 06:42 AM
Last Post: heiner55
  Ending loop with string (capital & lowercase) MattWilk97 3 3,495 Oct-22-2017, 09:13 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

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