A title preview

Write code · Medium · §2.4, §6.2 Otherwise

The post list shows only up to 10 characters of each title. If title is longer than 10 characters, keep only its first 10 characters and add three dots (...) at the end. If it is 10 characters or shorter, leave it as it is. Store the result in preview. Spaces count as characters too.

Starter code

title = "Daily data visualization tips"

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.