def f1(arg): ''' Функция f1 должна вывести отсортированный список профессий без повторений (строки в разном регистре считать равными). Сортировка должна игнорировать регистр. Используйте наработки из предыдущих заданий.''' #raise NotImplemented return sorted(unique(field(arg, 'job-name'), ignore_case=True))
def f1Analog(args): JobsArray = [] for i in args: for k, d in i.items(): if k == "job-name": JobsArray.append(d) UJ = unique(JobsArray, True) UJA = [] f = True while f: try: UJA.append(next(UJ)) except StopIteration: f = False UJA = sorted(UJA) return (UJA)
def f1(arg): # Отсортированный без повторений Список названий профессий return sorted((x for x in unique(list(field(data, "job-name")), ignore_case=True)))
def f1(data): return sorted(list(unique(list(field(data, 'job-name')), ignore_case=True)))
def f1(arg): return sorted([j for j in unique((dict(i)['job-name'] for i in arg))])
#!/usr/bin/env python3 from librip.gens import gen_random from librip.gens import gen_random_one_string from librip.iterators import unique data1 = list(i for i in unique([1, 1, 1, 1, 1, 2, 2, 2, 2, 2], ignore_case=True)) data2 = list(i for i in unique(gen_random(1, 3, 10), ignore_case=True)) data4 = list(i for i in unique(['a', 'A', 'b', 'B'], ignore_case=True)) data5 = list(i for i in unique(['a', 'A', 'b', 'B'], ignore_case=False)) print(data1) print(data2) print(data4) print(data5) #Реализация задания 2
def f1(arg): return sorted(unique([x for x in field(arg, "job-name")], ignore_case=True), key=str.lower)
def f1(arg): return sorted(list(unique(field(arg, "job-name"), ignore_case=True)), key=lambda x: str.casefold(x))
def f1(arg): return (sorted( [i for i in unique([j['job-name'] for j in arg], ignore_case=True)]))
def f1(arg): return sorted(unique(field(arg[0], "job-name"), ignore_case=True))
def f1(arg): return sorted(unique(field(data, "job-name"), ignore_case=True), key=lambda x: x.lower())
def f1(arg): return sorted(job for job in unique(field(arg, "job-name"), True))
def f1(arg): return sorted(unique(field(arg, "job-name")))
def f1(data): return sorted((unique(field(data, 'job-name'), ignore_case=False)), key=lambda x: x.lower())
def f1(arg): return list( sorted(unique(field(data, 'job-name'), ignore_case=True), key=lambda x: x.lower()))
def f1(arg): return sorted(unique([x for x in field(arg, 'job-name')], ignore_case=True))
def f1(arg): return sorted((x for x in unique(list(field(data, "job-name")), True)))
def f1(arg): return sorted(unique(field(arg, 'job-name'), ignore_case=True))
def f1(arg): return sorted(unique(field(arg, 'job-name'), ignore_case=1), key=lambda x: x.lower())
def f1(arg): return sorted(unique((field(arg, 'job-name')), ignore_case=True), key=str.lower)
def f1(arg): return sorted( [a for a in unique([i["job-name"] for i in arg], ignore_case=1)])
def f1(arg): uni = unique([i for i in field(arg, 'job-name')], ignore_case=True) for i in uni: pass return uni.items
def f1(arg): #return (sorted(unique(field(arg,"job-name"),ignore_case=True))) return sorted(unique(field(arg, "job-name"), ignore_case=1), key=lambda x:x.lower())
def f1(arg): return list( sorted(list(unique(list(field(arg, 'job-name')), ignore_case=True))))
def f1(arg): job = list(field(arg, 'job-name')) job = unique(job, ignore_case = True) job = sorted(job) return job
def f1(arg): return list(unique(arg))
def f1(arg): return sorted(list(unique(field(arg, 'job-name'))), key=lambda s: s.lower())
def f1(arg): return list(unique(list(field(arg, "job-name")), ignore_case=True))
def f1(arg): return sorted(unique([i for i in field(arg, 'job-name')], ignore_case=True), key=lambda x: x.lower())
def f1(arg): return list(unique(sorted(field(arg, "job-name"))))