Is there a way to globally set the sep
parameter of the print
function?
I'm getting tired of always doing this manually for every print
statement.
Simple example:
some_superlong_list : List # existing list-object with A LOT of elements
print(*some_superlong_list, sep ="\n")
# do something with some_super_long_list
print("IDs:", *map(id.some_superlong_list), sep = "\n")
print("new values:", *some_super_long_list, sep = "\n")
Of course, I could add a shortcut sep = "\n"
, but I'd still have to assign the sep
parameter for each print
statement.
Is there a way to do something like this?
print.sep = "\n" # something like this, to set the 'sep' parameter to "\n" by default