python 3.x - How to check condition and choose return -


this question has answer here:

in c# if wanted word 'many' display if count 10 or more:

int count = 10; var result = count < 10 ? count : "many"; 

how do in python?

simply use print function , if-else statement:

>>> count =10 >>> print('many') if count>=10 else '' many 

Comments