python3 shebang and string functions to methods