Answers for "ternary for loop python"

0

Example of Ternary Operator in Python

Program to demonstrate ternary operators in Python
marks = input('Enter the marks: ')
print("The result is Pass" if int(marks)>=35 else "The result is Fail")
Posted by: Guest on November-29-2021
0

what is the ternary operator in python

condition = True
print("This condition is true!") if condition else print("This condition is false!")
# The if statement in one line! (Ternary operator)
Posted by: Guest on August-05-2021
0

ternary operator python

value_if_true if condition else value_if_false
Posted by: Guest on June-03-2021

Python Answers by Framework

Browse Popular Code Answers by Language