refactor: use f-strings instead of str format · Issue #4117 · TheAlgorithms/Python · GitHub
Skip to content

refactor: use f-strings instead of str format #4117

Description

@CarsonHam

Formatted string literals, or f-strings, were a new feature introduced in Python 3.7, and according to several articles, like this one, they are over 3x faster than using the str format method.

The contributing guidelines for this project state that the use of f-strings is "encouraged", and it is an easy fix to go back and change all occurrences of str format to f-strings.

I would be happy to make the update myself. I will submit a pull request as soon as I implement the changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleUsed to mark an issue or pull request stale.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions