Skip to content

Remove str() from call to print()

Documentation Index

Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt

Use this file to discover all available pages before exploring further.

Sourcery refactoring id: remove-str-from-print

Section titled “Sourcery refactoring id: remove-str-from-print”

Removes unnecessary calls to str() from within print()

print(str(1))
print(1)

Objects passed into calls to the print() function already have str() called on them, so it is not required to do so yourself.