+ 1

For example: def name(word): print word name("hesham") How to make it accept writing hesham instead of "hesham" ?

18th Mar 2017, 12:41 PM
Hesham Emara
2 Réponses
+ 7
@Bharath, I believe you should replace your print statement with return statement def name (word): return word
18th Mar 2017, 1:28 PM
LayB
LayB - avatar
+ 1
def name(word): print word hesham ="hesham" name(hesham) in the end, a string has to be in quotes
18th Mar 2017, 12:49 PM
Bharath
Bharath - avatar