Skip to content

using list and join function #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions from-google-translate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from googletrans import Translator
text = 'Hola Mundo!'
translator = Translator()
print(translator.translate(text).text)
Comment on lines +1 to +4
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice implementation! I'll be accepting this PR for this solution after we've made a couple of changes to it.

Here's the list of changes I want you to make:

  1. Can you add the version of the googletrans library as a comment? So that users can know what version of googletrans to use while running this program.
  2. I need you to add an empty line at the end of this file.

Kindly implement these changes and I'll be happy to merge this PR in.

4 changes: 4 additions & 0 deletions using-Try-except.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
try:
raise Exception("Hello, World!")
except Exception as e:
print(str(e))
Comment on lines +1 to +4
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an existing implementation for this solution that you've submitted!

You can find the existing solution here. The concept is the same (to use exceptions) so I'll be needing you to remove this submission from your PR.

4 changes: 4 additions & 0 deletions using-list-and-join.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
words = ["Hello", "World"]

message = " ".join(words)
print(message)
Comment on lines +1 to +4
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an existing implementation for this solution that you've submitted!

You can find the existing solution here. Using the .join() method to join the elements of a list has been already implemented. I'll need you to remove this implementation from this PR as well.