Skip to content

Instantly share code, notes, and snippets.

@anuvyklack
Last active September 15, 2019 04:26
Show Gist options
  • Save anuvyklack/a8782cb2bba6f9279a905024a8cb6b7f to your computer and use it in GitHub Desktop.
Save anuvyklack/a8782cb2bba6f9279a905024a8cb6b7f to your computer and use it in GitHub Desktop.
[Python]
>>> name="Василий"
>>> f'{name}'
'Василий'
>>> f'name'={name}
'name=Василий'

>>> f'{name=}'  # if version >= python 3.8
"name='Василий'"

Get the path of the current script

import os.path as p
DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment