9 Matching Annotations
  1. Mar 2020
  2. May 2019
  3. Jan 2019
    1. 'a.b-c'.split(".-") splits only on '.-' both a . followed by a -, so in this case it fails to split anywhere, since '.-' is not anywhere in the text at all. Note we can also write re.split('(?:\.|-)', 'a.b-c') which also returns ['a','b','c'].

      difference between .split and re.split

    2. re.match ("(a+)b","aaab") matches; re.match ("(a+)b","xaaab") doesn't match re.search("(a+)b","aaab") matches; re.search("(a+)b","xaaab") matches

      search only needs to find one part that works. match needs to be exact

    3. [int(i) if i != None else None for i in m.group(1,2,3)]

      EX

    1. votes = [('Charlie', 20), ('Able', 10), ('Baker' ,20), ('Dog', 15)] for c,v in votes.sort(): print('Candidate', c, 'received', v, 'votes') print(votes)

      WONT WORK. VOTES.SORT() DOESN'T RETURN ANYTHING

  4. Dec 2018
  5. Oct 2018
    1. We may hate and fear the death of a loved one, and do whatever we can to prevent it, while also recognizing “that a mortal life is the only life in which the people one loves could actually be.” This tension is, says Nussbaum, “part of the best human life” (Nussbaum 1990: 381).

      The author makes a crucial reference to Nussbaum in order to emphasize the power of life and being mortal. Nussbaum states that this specific, unaltered type of life is the "only life in which the people one loves could actually be". Nussbaum critiques the idea of transhumanism regarding the advantages of embracing devices that exceed the standards of mortality in order to demonstrate her cherishing attitude toward the simple and natural way of life. In addition, Nussbaum introduces the paradox comprising of the fear and embracement of death. While death brings sorrow and remorse, it also brings contentment and satisfaction because the living know that with death comes release from worldly pains.