I want to convert a datetime string to datetime object which will be further processed to display in a different format.  The string is in the for, 2018-04-24T16:42:17Z.  I have tried the following method but it gives error.  import datetime datetime.datetime.strptime('2018-04-24T16:42:17Z', '%b %d %Y %I:%M%p')   Traceback (most recent call last):   File "&lt;stdin&gt;", line 1, in &lt;module&gt;   File "D:\Python\lib\_strptime.py", line 510, in _strptime_datetime     tt, fraction = _strptime(data_string, format)   File "D:\Python\lib\_strptime.py", line 343, in _strptime     (data_string, format)) ValueError: time data '2018-04-24T16:42:17Z' does not match format '%b %d %Y %I:%M%p'   Please help.
I need to parse  strings like "2008-09-03T20:56:35.450686Z" into Python's datetime type.  I have found  in the Python standard library, but it is not very convenient.  What is the best way to do this?
Javascript profanity match NOT replace Pokemon Egg Disappearing So my Pokemon eggs are reaching "maturity" then they just disappear. I don't get a new Pokemon. The egg just disappears. I had this happen with a 2k and a 5k now. Is this happening to anyone else? How to serve static files in Flask Normal subgroup of prime index Generalizing the case $p=2$ we would like to know if the statement below is true.  Let $p$ the smallest prime dividing the order of $G$. If $H$ is a subgroup of $G$ with index $p$ then $H$ is normal. Well, this is an exercise problem from Herstein which sounds difficult:   How does one prove that if $|G|&gt;2$, then $G$ has non-trivial automorphism?   The only thing I know which connects a group with its automorphism is the theorem, $$G/Z(G) \cong \mathcal{I}(G)$$ where $\mathcal{I}(G)$ denotes the Inner- Automorphism group of $G$. So for a group with $Z(G)=(e)$, we can conclude that it has a non-trivial automorphism, but what about groups with center? It is a general concept that horizontal forces can only influence physical quantities along horizontal direction; similarly vertical force can produce acceleration etc. only along vertical direction. This is the same concept that helps us study projectile motion as a combination of two independent motions. If this relation is universally true, how come, then friction depend on a force which normal to it? New to both Ruby and Rails but I'm book educated by now (which apparently means nothing, haha).  I've got two models, Event and User joined through a table EventUser  class User &lt; ActiveRecord::Base   has_many :event_users   has_many :events, :through =&gt; :event_users end  class EventUser &lt; ActiveRecord::Base   belongs_to :event   belongs_to :user    #For clarity's sake, EventUser also has a boolean column "active", among others end  class Event &lt; ActiveRecord::Base   has_many :event_users   has_many :users, :through =&gt; :event_users end   This project is a calendar, in which I have to keep track of people signing up and scratching their name out for a given event. I figure the many to many is a good approach, but I can't do something like this:  u = User.find :first active_events = u.events.find_by_active(true)   Because events don't actually HAVE that extra data, the EventUser model does.  And while I could do:  u = User.find :first active_events = [] u.event_users.find_by_active(true).do |eu|   active_events &lt;&lt; eu.event end   This seems to be contrary to "the rails way".  Can anyone enlighten me, this has been bugging me for a long time tonight (this morning)? How to get a list of appendices? How to get a list of appendices like the list of figures and list of tables? How to set it on a separate page, like the list of figures and list of tables? I wanted to know how I could configure multi-touch gestures in Ubuntu. In windows I can do this using the synaptics driver software.  I have already used synclient to configure the taps, palmdetect, scroll, etc. But I'd also want gesture support. Is is even possible?  System-Info: Ubuntu 12.10, Synaptics clickpad I'd wish to visit Dubai with my girlfriend, but after reading  and  I started to get a little worried about it. How should I book an hotel? Must I book two singles? Could it be a problem if we walk together in the city and go together to restaurants and malls without being married? Why are we still using CPUs instead of GPUs? It seems to me that these days lots of calculations are done on the GPU. Obviously graphics are done there, but using CUDA and the like, AI, hashing algorithms (think bitcoins) and others are also done on the GPU. Why can't we just get rid of the CPU and use the GPU on its own? What makes the GPU so much faster than the CPU? How do I change the computer name? When I connect to my server (ubuntu server 10.10), I get this:  name@server-name.belkin ~&gt;   How can I remove ".belkin"? Install MySQLdb (for python) as non-compressed egg The install instructions are:  $ python setup.py build $ sudo python setup.py install # or su first   This gives me an .egg file. How do I tell the install to dump the files as a normal, uncompressed library?  Thanks! Is Angular momentum conserved in Impure rolling How do you get JavaScript/jQuery Intellisense Working in Visual Studio 2008? Getting polygon shapefile node coordinates and point order I'm using Ubuntu 17.10 with GNOME shell and Numix-Circle icon theme.   When I hover over the Numix icon for Nightly Web Browser, which is pinned to the dock I get the title "Nightly Web Browser".      But when I launch the program, another icon pops up at the bottom, with the name "Nightly". My current idea is to use the dual graph, and prove that that is a bipartite graph, and so proving the statement. But I can't seem to figure out how even degree for all verticies means that it is bipartite.  Any help is appreciated. Thanks! How to make the term "page" show in the Glossary list? "It looks straightforward, but actually it isn't"