Skip to content

Conversation

Technight27
Copy link

Ihave added one more simple solution

Copy link
Owner

@hevalhazalkurt hevalhazalkurt left a comment

Choose a reason for hiding this comment

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

Looks good, only one little request before merge your solution.

n = int(input())
arr = map(int, input().split())
l=[]
l=list(arr)
Copy link
Owner

Choose a reason for hiding this comment

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

Thank you for your contribution! Your solution is correct, but we can make a few improvements. You define l twice as list you don't need that. In fact, doing as in the example below where you define arr can further simplify your code.

arr = list(map(int, input().split()))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants