I am writing a small script to help out with Japanese kana memorisation. How would I combine the following lists into one? I tried as follows.
a = ["a", "i", "u", "e", "o"]
k = ["ka", "ki", "ku", "ke", "ko"]
g = ["ga", "gi", "gu", "ge", "go"]
s = ["sa", "shi", "su", "se", "so"]
z = ["za", "ji", "zu", "ze", "zo"]
t = ["ta", "chi", "tsu", "te", "to"]
d = ["da", "du", "de", "do"]
n = ["na", "ni", "nu", "ne", "no"]
h = ["ha", "hi", "hu", "he", "ho"]
b = ["ba", "bi", "bu", "be", "bo"]
p = ["pa", "pi", "pu", "pe", "po"]
m = ["ma", "mi", "mu", "me", "mo"]
y = ["ya", "yu", "yo"]
n = ["n"]
kana = [a, k, g, s, z, t, d, n, h, b, p, m, y, n]
print kana
With installed Kutools for Excel, you can use the Select duplicates & unique cells function to solve the problem that combine two list without duplicates. 1. Copy one of the two lists and paste it to the bottom of the other list, select the new list, then click Kutools > Select Tools > Select duplicates & unique cells.
chain() method is passed the arguments of list1, list2 and list3. This method takes multiple arguments and returns a single sequence of items. So, the chain() method concatenates all three lists. The result of the method call is converted into a list using the list() method.
One way:
kana = a + k + g + s + z + t + d + n + h + b + p + m + y + n
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With