Skip to content

tade147/-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

with open('pi_digits.txt') as file_project: contents = file_project.read() print(contents)

error: 1 ZeroDivisionError 2 try-except filename = 'alice.txt'

try: with open(filename) as f_obj: contents = f_obj.read() except FileNotFoundError: msg = "Sorry, the file " + filename + " does not exist!" print(msg)

import json

filename = 'username.json' try: with open(filename) as f: username = json.load(f) except FileNotFoundError: username = input("What's your name? ") with open(filename, 'w') as f: json.dump(username, f) print("We'll remember you when you come back, " + username + " !") else: print("Welcome back! " + username + " !")

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages