549f0c4382
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
22 lines
406 B
Python
22 lines
406 B
Python
|
|
import numpy as np
|
|
|
|
# Your input data as a list of strings
|
|
data = [
|
|
"MMMSXXMASM",
|
|
"MSAMXMSMSA",
|
|
"AMXSXMAAMM",
|
|
"MSAMASMSMX",
|
|
"XMASAMXAMM",
|
|
"XXAMMXXAMA",
|
|
"SMSMSASXSS",
|
|
"SAXAMASAAA",
|
|
"MAMMMXMMMM",
|
|
"MXMXAXMASX"
|
|
]
|
|
|
|
# Convert each row into a list of characters, then stack them into an array
|
|
array = np.array([list(row) for row in data])
|
|
|
|
# Display the array
|
|
print(array) |