Posts

Showing posts with the label set()

Lists operators

# #        String and lists operations # #        len() - components number list #         +    -  concatenate list operator #        set() - list conversion în set #          &   -  intersection operator in setss String = 'This is a string' Word_list_A = ['AUDI ', 'FORD ', 'DACIA ', 'TATA', 'RENAULT ',                    'CITROEN', 'LAMBORGHINI ', 'FERRARI' , 'VOLKSWAGEN',                  'ASTON MARTIN' 'BUICK ', 'ALFA ROMEO ',  'CRYSLER ',                 'BMW'] Word_list_B = ['LADA', 'SKODA', 'VOLGA', 'TATRA', 'PEUGEOT', 'SAAB',                    'VOLVO', 'TOYOTA', 'HYUNDAI', 'SUBARU'] Length_A = len(Word_list_A) Length_B = len(Word_list_B) pri...