Login
Remember
Register
Ask a Question
What's the cycle to get the home index utilizing '~' in Python Language?
0
votes
asked
Aug 29, 2020
in
Python
by
Robindeniel
What's the cycle to get the home index utilizing '~' in Python Language?
#python-utilization
Python-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Aug 29, 2020
by
sharadyadav1986
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
...