2018年1月11日 星期四

Python: List home directory without absolute path

Python: List home directory without absolute path

Python Basic: Exercise-132 with Solution

Write a Python program to list home directory without absolute path.
Sample Solution:-
import os.path
print(os.path.expanduser('~'))

================= RESTART: F:/Python_APSC/py-ex-basic-132.py =================
C:\Users\User\AppData\Roaming\SPB_16.6
>>> 

沒有留言:

張貼留言

2026 作業3 RFID+ Telegram 練習

 2026 作業3  RFID+ Telegram  練習 (Wokwi 與 Telegram 二者溝通訊息反映比較慢 ) 歡迎 Alex 使用 RFID 控制系統 /on : 開啟 LED /off : 關閉 LED /flash : 閃爍模式 /timer : 開啟 5 秒 ...