In C# I would do this if I wanted the word 'Many' to display if the count was 10 or more:
int count = 10;
var result = count < 10 ? count : "Many";
How do you do this in python?
In C# I would do this if I wanted the word 'Many' to display if the count was 10 or more:
int count = 10;
var result = count < 10 ? count : "Many";
How do you do this in python?
Simply use print
function and if-else
statement:
>>> count =10
>>> print('many') if count>=10 else ''
many