def Complicated_Greetings(name): if name: return 'Hello ' + name return 'Hello, World!!'
- def Complicated_Greetings(name):
h=["H","e","l","l","o"]c=","w=["W","o","r","l","d"]e="!"k=""for i in h:k+=iif name=="":k+=ck+=" "for i in w:k+=ik=k+e+eelse:k+=" "k+=namereturn k- if name:
- return 'Hello ' + name
- return 'Hello, World!!'