
Notifications
Clear all
What is f string literal ?
0
02/06/2023 7:12 am
Topic starter

Give explanation and an example.
Answer
Add a comment
Add a comment
1 Answer
1
02/06/2023 2:44 pm
Also called “formatted string literals,” f-strings are string literals that have an f at the beginning and curly braces containing expressions that will be replaced with their values. The expressions are evaluated at runtime and then formatted using the __format__ protocol.ython f-strings is introduced to have minimal syntax for string formatting. The expressions are evaluated at runtime. If you are using Python 3.6 or higher version, you should use f-strings for all your string formatting requirements.
Add a comment
Add a comment
Forum Information
- 22 Forums
- 1,969 Topics
- 5,307 Posts
- 0 Online
- 1,282 Members
Our newest member: TimothySenue
Latest Post: Space bug using " & n b s p ; "
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed