Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 14c35c2

Browse files
Delete sameCity.py file
1 parent 4e79b7f commit 14c35c2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

‎27th March/check_same_city.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
def check_same_city(person1, person2):
2+
if person1['city'] == person2['city']:
3+
return True
4+
else:
5+
return False
6+
7+
# Example usage
8+
person1 = {'name': 'John', 'city': 'New York'}
9+
person2 = {'name': 'Jane', 'city': 'Los Angeles'}
10+
11+
if check_same_city(person1, person2):
12+
print("Both persons belong to the same city.")
13+
else:
14+
print("Both persons belong to different cities.")

‎27th March/sameCity.py

Whitespace-only changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /