0 votes
in Python by

What's the cycle to get the home index utilizing '~' in Python Language? 

1 Answer

0 votes
by
You have to import the os module, and afterward only a solitary line would wrap up.

import os

print (os.path.expanduser('~'))

Yield:

/home/sprinter

Related questions

0 votes
asked Aug 29, 2020 in Python by Robindeniel
0 votes
asked Jun 28, 2020 in Python by Robindeniel
...