Skip to content

Commit

Permalink
Final changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AliHusseinAlmoussawi committed Nov 26, 2023
1 parent fd82506 commit 45cdb8b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def addANewTab(Tabs):
Tab['URL'] = "https://" + input("Please enter the url: ")
Tab['nestedTabs'] = []
Tabs.append(Tab)
print("Tab is successfully opened.")


# Closing tab
Expand All @@ -34,13 +35,15 @@ def closeTab(Tabs):
print("Tab closed successfully")

# check if input is valid
elif 0 <= int(i) <= len(Tabs):
Tabs.pop(int(i))
print("Tab closed successfully")
elif i.isdigit()==True:
if 0 <= int(i) <= len(Tabs):
Tabs.pop(int(i))
print("Tab closed successfully")

else:
print("Invalid input.")
else:
print("Invalid input.")

print("Invalid input")

# Displaying parent tab content
def switchTabs(Tabs):
Expand Down Expand Up @@ -139,7 +142,7 @@ def sortTabs(Tabs):

print("Tabs sorted successfully")
else:
print("There should be at least two tabs to sort.6")
print("There should be at least two tabs to sort.")
printTitles(Tabs)


Expand Down

0 comments on commit 45cdb8b

Please sign in to comment.