1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Mar 16 17:08:52 2018 @author: beast """ def version1(): a=['a','b','c','d','e'] # list 1 b=['a','b','c','d','e','f','g','h'] # list 2 c=[k for k in (a)if (k in (a) and k not in (b))] # include unique item from list 1 : items are (list1-list2)(set thoery) d=[l for l in (b) if l in (a ) and l in (b) or (l not in (a) and l in (b))] #include all the comman from list 1 and unique from list 2 lst=c+d # append above two comprehensed list to get union of list1 U list2 lst.sort() # not neccessay but makes list easy to understand (sorting in ascending order ) print("\n\na=",a) print("\n\nb=",b) print("\n\nunion=",lst) return lst # make it easy to import and use e.g import union_beast.py and then call union_beast.version1() it will return this union of list def version2(): a=['a','b','c','d','e'] # list 1 b=['d','e','f','g','h'] # list 2 c=[] for k in range (max(len(a),len(b))):# max return maximum number among two or more number so we iterate over max of length of both the list if k <len(a) and a[k] not in (b) : # if length of a is greater than current indexing and element at kth index is not present in list b (ie get List1-list 2 item) c.append(a[k]) # if item is unique to list 1 then append to result list (here c) if k <len(b) and b[k] not in (a) :# same as above logic but here we get item unique to list 2 (here list b) c.append(b[k]) # same append to result list (here c) if k <len(b) and b[k] in (a) : # now add the comman item to list (this is vital step as we only add only one instance of item that are both present in list 1 and list 2) eg if 2 is present in list 1 and list 2 we add only one 2 to result list c.append(b[k]) # append to result list (here c) c.sort() # not neccessary but make the result more eye catchy print("\n\na=",a) #print list 1 print("\n\nb=",b)#print list 2 print("\n\nunion=",c) #print the result if __name__=="__main__": # used to run the function via main loading ...i.e if the module is not imported print("\n----------by version 1------------\n") version1() print("\n\n------------by version 2------------") version2() |
What is SMS Spoofing? SMS Spoofing allows you to change the name or number text messages appear to come from. The Story Behind SMSspoofing.com SMSspoofing.com initially was a service that launched in August 2005 allowing users to spoof SMS text messages. However, the service only lasted a few days due to legal threats from around the world. Pressure was put on us by our bulk text messaging provider because mobile carriers around the world were complaining that they were responsible for thousands of spoofed SMS messages. The plug was pulled and we were forced to stop offering our SMS spoofing service. In a matter of days over 250,000 people had visited this site and over 25,000 users from around the world, mostly in Europe (specifically the Czech Republic, where we were prominently featured by the media), had signed up for our service. This website has pretty much been abandoned until we decided to turn this site into an information site in June 2008! Now we're back a...
Comments
Post a Comment
share your thoughts ....