vaibbhav Posted May 17, 2019 Share Posted May 17, 2019 I have got the code from the net and have made some modifications. I would like the name of the country to repeat only once, however, it gets repeated more than once sometimes. hello.py Link to comment Share on other sites More sharing options...
Funce Posted May 19, 2019 Share Posted May 19, 2019 What's the erroneus output? Do you end up needing monaco _ senegal? Triple quotes (""") in python include everything inside them. This includes newline (\n) characters. To ignore the new line character, you need to place a backslash(\) before you go to your new line. Example below countries = """algeria spain armenia barbados chile ecuador ghana jamaica luxemborg kuwait monaco \ senegal turkey""" Also try using the codeblock feature so we can see the code without needing to download it. A lot of the time we notice what's wrong before even needing to run it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now