format-string

F-string returns file object name

F-string returns file object name Question: Trying to understand the output of the following code: 1 #!/usr/bin/python3 2 3 from os.path import exists 4 5 filename = input("What file do you want to erase?: ") 6 7 check = exists(filename) 8 9 if check == True: 10 target = open(filename, "r+") 11 print(f’Your {target} file …

Total answers: 1

how shall i call out this function using string format method?

how shall i call out this function using string format method? Question: i’m learning Python and have began with Google’s Python Automation Beginner course. Idk if i chose it right but im already in week 4 and now have started facing confusion. Fill in the gaps in the nametag function so that it uses the …

Total answers: 11