
Question :
In this task, you are requested to merge two lists into a sorted list (sorting should be in an ascending order). The function should also remove any duplicated numbers.
The function should also remove any duplicated numbers.
The function should return the new sorted list.
Example:
list1 : [-1,1,3,5,7,9]
list2: [-2,2,3,4,5,6]
The function should return:
[-2,-1,1,2,3,4,5,6,7,8,9]
Note: assume the lists contains integers.
Solution :
Python
#https://codewindow.in
#join our Telegram @codewindow
l1=list(map(int, input().split(',')))
l2=list(map(int, input().split(',')))
print(sorted(l1+l2))
#end
Follow us
Also Checkout
- Mindtree Off-Campusing | Junior Software engineer for cyber security | codewindow.in
- Kantar Off-Campusing | Software Engineer | codewindow.in
- HSBC Off-Campusing | Trainee Software Engineer/Group Data Technology | codewindow.in
- Sprinto Off-Campusing | Product Intern | codewindow.in
- Wipro Fresher Off-Campusing | Project Engineer | codewindow.in
- GlobalLogic Off-Campusing | Associate Software Engineer | codewindow.in
- GAVS Off Campus Hiring Drive – Trainee Software Engineer – Codewindow.in
- 3DS Off-Campusing | QA Automation Developer for Information Systems | codewindow.in
- Deloitte Off-Campusing | Associate Analyst – HR Analytics | codewindow.in
- Siemens Off-Campusing | Software Developer | codewindow.in
- Infosys Off Campus Recruitment Drive | Codewindow.in
- IBM Off Campus Drive 2022 – Associate Systems Engineer – codewindow.in
- Hexaware Off-campusing – Graduate Trainee – codewindow.in
- Accenture Off-Campusing – System and Application Services Associate – codewindow.in
- TCS Off Campus Hiring for YoP 2020, 2021 & 2022 | codewindow.in
- ColorTokens Off-Campusing | Engineering | codewindow.in
- Replicon Off-Campusing | QA Engineer | codewindow.in
- New Coding Program | Set-6 SOLVED | codewindow.in
- Protected: Testing New Styles
- Protected: Py-repl – python Compiler – Codewindow.in
- Protected: test pyscript
- Git & GitHub Tutorial – GitHub Basics Simplified in 3 Minutes – codewindow.in
- Amazon Off Campus Recruitment Drive – TA Intern – Codewindow.in
- Copy Constructor in Python – Clear Understanding in 5 Minutes – codewindow.in
- Freshworks Off Campus Recruitment Drive | Graduate Trainee | Codewindow.in
- Protected: Try About us
- Quick Heal | Software Engineer | codewindow.in
- Salient Process, Inc. | Full time Junior Business Automation Consultant | codewindow.in
- New Coding Program | Set-5 SOLVED | codewindow.in
- New Coding Program | Set-4 SOLVED | codewindow.in
- New Coding Program | Set-3 SOLVED | codewindow.in
- Git & GitHub Tutorial – Easy Git Commands Part 2 – codewindow.in
- New Coding Program | Set-2 SOLVED | codewindow.in
- New Coding Program | Set-1 SOLVED | codewindow.in
- Git & GitHub Tutorial – Easy Git Commands Part 1 – codewindow.in
- Git & GitHub Tutorial – Git Basics Simplified in 5 MINUTES – codewindow.in
- DXC Technology Off-Campusing | Associate Professional Software Engineer | codewindow.in
- HCL Off-Campusing | Technical troubleshooting | codewindow.in
- Cvent Off-Campusing | Associate Product Consultant | codewindow.in
- Dell Off-Campusing | Software Engineer | codewindow.in
- Tata Elxsi Off-Campusing | Design Engineer | codewindow.in
- Wipro Off-Campusing | Wipro’s Work Integrated Learning Program (WILP) | codewindow.in
- Harman Off-Campusing | Software Engineer, Product Development | codewindow.in
- Boeing Off-Campusing | Programmer Analyst (Java Full Stack) | codewindow.in
- Applications Of Machine Learning In Businesses | codewindow.in
- Hewlett Packard Off Campusing | Test Tool Developer | codwindow.in
- Tech Mahindra Aptitude Solve | Set-B | Part II | codewindow.in
- Tech Mahindra Aptitude Solve | Set-B | Part I | codewindow.in
- Shell Off-Campusing | Business Analyst | codewindow.in
- Atos off-Campusing | codewindow.in
- May 2022 (76)
- April 2022 (72)
- March 2022 (31)
- February 2022 (28)
- January 2022 (26)
- December 2021 (25)
- November 2021 (94)
- October 2021 (64)
- September 2021 (55)
- August 2021 (19)
- July 2021 (29)
- June 2021 (103)
- May 2021 (85)
- April 2021 (173)
- March 2021 (145)
- January 2021 (4)
- December 2020 (3)
- November 2020 (14)
- October 2020 (35)
- September 2020 (15)