02/06/2023 7:12 am
Topic starter
Notifications
Clear all
What is f string literal ?
0
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
- 14 Forums
- 1,836 Topics
- 5,052 Posts
- 0 Online
- 1,078 Members
Our newest member: Richardnop
Latest Post: loli
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed