We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
In short, f-strings are similar to str.format(), however, they are less verbose and they are actually expressions that are evaluated at runtime. This means that you can also evaluate any python expression within the brackets.
This page explains in much more detail how to use f-strings.
This issue is why f-strings are faster than other string format methods.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Staircase
You are viewing a single comment's thread. Return to all comments →
In short, f-strings are similar to str.format(), however, they are less verbose and they are actually expressions that are evaluated at runtime. This means that you can also evaluate any python expression within the brackets.
This page explains in much more detail how to use f-strings.
This issue is why f-strings are faster than other string format methods.