Pythonのコードで、以下のようなコードを見かけたのですがどういう意味でしょうか?
特に、fと{name}がわかりません。
Python
1import sys 2import os 3 name = hogehoge 4 if os.path.exists(f'dir/{name}'): 5 sys.exit() 6``` 7 8意味としては、以下のようだと思うのですが、上記のfはなんでしょうか? 9```Python 10import sys 11import os 12 name = hogehoge 13 if os.path.exists('dir/{name}'.format(name=name)): 14 sys.exit()
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/02/26 13:50
2018/02/26 13:58
2018/02/26 14:02