instead of printing 1x - 1 we need x - 1 how ?
n = 1
a = 1
# in this condition, we check if our x is equal to 1,
# then a space will be displayed
# (instead of a space, you can use the None value, but it will be displayed as Nonex - 1
if n == 1:
n = ''
print(f'{n}x - {a}')
Comments
Leave a comment