# How to use 'string multiplication python' in Python

Every line of 'string multiplication python' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure. ## All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
``34def multiplication(one_num, two_num):35    total = 036    other_count = 03738    # Find bigger number in order to set length of both numbers39    if len(one_num) &gt;= len(two_num):40        longer = one_num41        shorter = two_num42    else:43        longer = two_num44        shorter = one_num4546    # Add zeroes to the front of the smaller number until lengths are equal.47    for i in range(len(longer) - len(shorter)):48        shorter = '0' + shorter4950    for i in range(len(shorter) - 1, -1, -1):51        count = 052        for j in range(len(longer) - 1, -1, -1):53            big_num = longer[j] + ('0' * count)54            product = int(big_num) * int(shorter[i] + '0' * other_count)55            total += product56            count += 157        other_count += 158    print(str(one_num) + ' * ' + str(two_num) + ' = ' + str(total))``
``30def multiply(self, num1, num2):31    """32    :type num1: str33    :type num2: str34    :rtype: str35    """36    return str(int(num1) * int(num2))``