Duplicate coursework permitted?

I was wondering if it was fine to take the same course at two different community colleges. It’s not a required course and I don’t mind if the credits from one of the courses don’t count towards transferring.

You can take whatever you want but will only get unit credit and grade from the first course (unless it’s C- or lower). Sometimes people do this to relearn something.