Python Forum
hello, i was trying a testdome python test
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hello, i was trying a testdome python test
#10
It seems to me that main question here is whether order should be preserved or not. If order is not important then very simple set-list conversion would do:

>>> def unique_names(first, second):
...     return list(set(first + second))
...
If order is important then you should have keep track whether element is already seen or not. Something like (pseudocode, not real one):

create list where unique items will be kept

for every item in lists which items will be uniquefied:
     if item in unique items list: continue
     else: append item to unique items list
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
RE: hello, i was trying a testdome python test - by perfringo - Aug-26-2020, 07:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to test the high-score in my Python-game Pluviometer 2 613 Oct-02-2023, 06:55 PM
Last Post: deanhystad
  How to test and import a model form computer to test accuracy using Sklearn library Anldra12 6 3,204 Jul-03-2021, 10:07 AM
Last Post: Anldra12
  cannot build python 3.8.2 (make test fails on test_imprtlib) borabora 1 2,776 May-08-2020, 09:10 PM
Last Post: Larz60+
  How to write test cases for a init function by Unit test in python? binhduonggttn 2 3,159 Feb-24-2020, 12:06 PM
Last Post: Larz60+
  How to write test cases by Unit test for database configuration file? binhduonggttn 0 2,588 Feb-18-2020, 08:03 AM
Last Post: binhduonggttn
  new python package test ramkrishna 0 1,883 Feb-25-2019, 12:18 PM
Last Post: ramkrishna
  Python test failed CodingMaster111 1 3,878 May-09-2018, 04:24 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020