-3

(Python Guess the Number)

where this f come from? or what does this f means?

Here is the code: guess = int(input(f 'Guess a number between 1 and {x}: '))

phillip
  • 1
  • 2

2 Answers2

0

A string with an 'f' in the beginning is called an f-string. It is one of the new python 3.6 features. You can read more about it in these links:

Tutorial on Python 3's f-strings

Official Documentation from python.org

Vedant36
  • 318
  • 1
  • 6
0

Thats a representation called f-string, they started supporting them in Python 3.6

https://realpython.com/python-f-strings/

Aparna Chaganti
  • 599
  • 2
  • 5
  • 15