This has to be in Python Thanks Delete Prussia from countryc

This has to be in Python. Thanks.

Delete Prussia from country_capital. Sample output for the given program: Prussia deleted? Yes. country_capital = {\'Spain\': \'Madrid\', \'Togo\': \'Lome\', \'Prussia\': \'Konigsberg\'} \'\'\'Your solution goes here\'\'\' print(\'Prussia deleted?\', end =\' \') if \'Prussia\' in country_capital: print(\'No.\') else: print(\'Yes.\')

Solution

country_capital = {\'Spain\', \'Madrid\',\'Togo\',\'Lome\',\'Prussia\', \'Konigberg\'}

country_capital.remove(\'Prussia\')
print \"Prussia deleted? \",
if \'Prussia\' in country_capital:
print(\'No\')
else:
print(\'Yes\')

Output:

sh-4.3$ python main.py

Prussia deleted?  Yes

This has to be in Python. Thanks. Delete Prussia from country_capital. Sample output for the given program: Prussia deleted? Yes. country_capital = {\'Spain\':

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site