Advertisement
informaticage

CamelCase version 2

Oct 13th, 2020
2,169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. source = input ("Inserire una frase con parole separate da spazio: ")
  2.  
  3. listaDiParole = source.split(' ')
  4. # Cammellizzare le stringhe e concatenarle
  5. indice = 0
  6. stringa_finale = ""
  7. while ( indice < len(listaDiParole) ):
  8.     stringa_finale = stringa_finale + listaDiParole[indice].capitalize()
  9.     indice = indice + 1
  10.  
  11. print("Output: ", stringa_finale)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement