We can use Python not equal operator with f-strings too if you are using Python 3.6 or higher version.

x = 10
y = 10
z = 20
print(f'x is not equal to y = {x!=y}')
flag = x != z
print(f'x is not equal to z = {flag}')
# python is strongly typed language
s = '10'
print(f'x is not equal to s = {x!=s}')

Output:

x is not equal to y = False

x is not equal to z = True

x is not equal to s = True

Hope it helps!!

If you need to know more about Python, It's recommended to join Python course today.

Thanks!