Split Item Codes

Published by Helen Yu in

You have an array of item codes with the following format: "[letters][digits]"

Create a function that splits these strings into their alphabetic and numeric parts.

Examples

split_code("TEWA8392") ➞ ["TEWA", 8392]

split_code("MMU778") ➞ ["MMU", 778]

split_code("SRPE5532") ➞ ["SRPE", 5532]

Notes

N/A

Watch a quick demo on how Edabit works.