PYTHON LOVERS! IF i take a input from user , then how we write code by which, user input cannot be enter the input blank. | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 4

PYTHON LOVERS! IF i take a input from user , then how we write code by which, user input cannot be enter the input blank.

removing blank output

14th Jun 2018, 4:37 PM
𝖆𝖙.𝖚𝕷
𝖆𝖙.𝖚𝕷 - avatar
7 Antworten
+ 4
logic will remain same for everything. this might help. and please save it if you want because I will delete it soon .😊 https://code.sololearn.com/cQ7ZYzPfqn77/?ref=app
14th Jun 2018, 4:51 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 3
I'll make a code for you...
14th Jun 2018, 4:50 PM
LONGTIE👔
LONGTIE👔 - avatar
+ 3
text = input() if len(text) == 0 : print("blank") else: print(text)
14th Jun 2018, 4:58 PM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar
14th Jun 2018, 4:52 PM
LONGTIE👔
LONGTIE👔 - avatar
0
thanks! for help
15th Jun 2018, 12:06 AM
𝖆𝖙.𝖚𝕷
𝖆𝖙.𝖚𝕷 - avatar
0
text == input() if text == ' ': print('cannot be blank') else: print(text)
15th Jun 2018, 9:07 PM
ghali lawal
ghali lawal - avatar
0
all of the above code is bypassed by giving too much space
20th Jun 2018, 2:17 AM
𝖆𝖙.𝖚𝕷
𝖆𝖙.𝖚𝕷 - avatar