One possible approach is
Filter(length, l)
# [[1]]
# [1] 1 2 3
#
# [[2]]
# [1] "foo"
where
l <- list(1:3, "foo", character(0), integer(0))
This works due to the fact that positive integers get coerced to TRUE by Filter and, hence, are kept, while zero doesn't:
as.logical(0:2)
# [1] FALSE TRUE TRUE