Python Long UTC DateTime String
Maybe, this is marginally cleaner, based on @Gareth's comment:

'{0:%d} {0:%b} {0:%Y} {0:%I}:{0:%M}:{0:%S}.{1:03d} {0:%p}'.format(now, now.microsecond // 1000)


The not so great part is treating now.microseconds differently from the rest. But since the vale is an integer in the range 0..999999, and you want the value divided by 1000, I don't see a way around. For example if the value is 12345, you would want to get 012. Padding with zeros is easy, once the number is divided by 1000. Or you could pad with zeros up to 6 digits and take the first 3 characters, but I couldn't find a formatting exceptions to do that.

The advantage of this way over the original is instead of 2 calls to strftime and a string concatenation and a string slicing, there's now a single .format call.