Q:

How to combine 3 tuples together in Python

I tried to count the character combine in the list.  In my script, I can count the tuples, but I don't know how I can count the total of characters in my list.
This is the script I have used. 
def count(num):
    character = 0
    for i in num:
        character += 1
    return character

count ('1234','1234',1234')

my answer is 3
I want to show 12.  How can I do that?

A:

def count(num):
    total = 0
    for i in num:
        total += len(i)
    return total

Or, shorter and more pythonic:
def count(num):
    return sum(len(x) for x in num)

Also you'll need to call it with a list or tuple argument, e.g. count (('1234','1234','1234'))
You also could add a star to the method definition (def count(*num)) to make it able to be called the same way you did originally.

A:

I'd prefer James' method since it feels more idiomatic, but this is what a functional approach would look like:
def count(num):
    return sum(map(len, num))

If you want this to work by calling count('1234', '1234', '1234') instead of count(('1234', '1234', '1234')), you can define the function with def count(*num).
Finally, if you want both of those calls to work (and you're sure the atomic type is only ever a string), you can do this:
def count(*num):
    return sum(len(n) if isinstance(n, str) else count(*n) for n in num)

