seasons <- c("Summer", "Fall", "Winter", "Spring")
winter <- factor("Winter", levels = seasons)
str_name <- as.character(winter)
# str_name = Winter
cat("str_name =", str_name, "\n")
# cat() on the factor itself prints the code
cat("winter =", winter, "\n")
# winter = 3